*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: white;
    font-family: "DotGothic16", "Consolas", "monospace";
    margin: 0;
    padding-bottom: 150px;
    position: relative;
}

h1 {
    text-align: center;
    margin-bottom: 5%;
}
#header1{
    margin-bottom: 0%;
    font-size: 35px;
}

#header2 {
    text-align: center;
    margin-bottom: 5%;
}

.action {
    margin-left: 5%;
    background-color: rgb(44,44,44);
    color: white;
    font-size: 20px;
    font-family: "DotGothic16", "Consolas", "monospace";
    text-decoration: none;
    padding: 12px;
    font-weight: bold;
    position: absolute;
    top: 70px;
}

.action:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px black;
    transform: scale(1.1);
}

.subtitle {
    font-size: 25px;
}

#welcome {
    text-align: center;
    margin: 5%;
}

.websitecontent {
    margin-left: 1%;
}

.p1{
    text-align: left;
    margin-top: 40px;
}
.l1 {
    display:inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgb(220, 220, 220);
    color: black;
    text-decoration:none;
    padding: 20px;
    font-size: 16px;
    border: 1px solid black;
    transition: transform 0.2s ease;
    vertical-align: middle;
    width: 200px;
    height: 100px;
    margin: 2%;
    margin-bottom: 3%;
    position: relative;
    cursor: pointer;
    box-shadow: 4px 4px 0px black;
}
.l1:visited {
    color: black;
}
.l1:hover {
    text-decoration:none;
    transform: scale(1.1);
}

.l1:hover .tooltiptext {
    visibility: visible;
}

.tooltiptext {
    visibility: hidden;
    width: auto;
    font-size: 10px;
    background-color: rgb(44,44,44);
    color: #ffffff;
    text-align: center;
    padding: 3px;
    position: absolute;
    z-index: 1;
    top: 100%; 
}

.f {
    width: 100%;
    padding: 40px 30px;
    background-color: rgb(104, 101, 101);
    text-align: center;
    position: absolute;
    bottom: 0%;
    margin-top: 5%;
}

.inputform {
    margin-top:2%;
    margin-bottom: 2%;
    display: inline-block;
    margin-left: 1%;
}

.ciphersection {
    display: inline-block;
    background-color: rgb(44, 44, 44);
    color: white;
    padding: 40px;
    padding-right: 60px;
    border: 4px solid black;
    width: 700px;
    height: 500px;
}

.rsavalues {
    border: 1px solid black;
    margin-top: 2%;
    padding: 12px;
    padding-right: 80px;
    
}

#startbutton {
    margin-bottom: 12%;
    font-size: 20px;
}

.answerbox {
    margin: 5%;
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

#cipherdisplay {
    margin-left: 1%;
    margin-bottom: 10%;
}
.attemptsdisplay {
    display: inline-block;
    border: 1px solid black;
    margin-top: 2%;
    padding: 1%;
    padding-left: 2%;
    padding-right: 2%;
    margin-bottom: 5%;
    background-color: rgb(44,44,44);
    color: white;
}

#caesarattempts {
    background-color: white;
    color: black;
}

.barcontainer {
    position: relative;
    width: 400px;
    height: 20px;
    display: flex;
    align-items: center;
}

.bar {
    height: 100%;
    width: 0;
    background-color:grey;
    transition: width 0.1s linear;
    border: 1px solid black;
}

.value {
    margin-left: 10px;
}

.usertext {
    margin-top:6%;
}

.plaintext {
    margin-top:6%;
}
.ls {
    color: black;
    text-decoration:none;
    font-size: 18px;
    display: inline-block;
    transition: transform 0.2s ease;
    padding: 5px;
}
.ls:visited {
    color: black;
}
.ls:hover {
    text-decoration: none;
    transform: scale(1.2);
}
.pa1 {
    margin-top: 4rem;
    text-align: center;
    margin-bottom: 10%;
}
.cipher {
    font-size:16px;
}
#p2 {
    text-align: left;
    width: 400px;
    height: 200px;
    padding: 10px;
    border: 1px solid black;
    margin-bottom: 10%;
}
.image {
    width: 30%;
    max-width: 50px;
    height: auto;
    vertical-align: middle;
}
.icon {
    position: absolute;
    top: 0px;
    right: 20px;
    width: 100px;
    height: auto;
}
.button {
    font-family: "DotGothic16", "Consolas", "monospace";
    padding: 5px;
}
.box {
    font-family: "DotGothic16", "Consolas", "monospace";
    padding: 5px;
    background-color: rgb(44,44,44);
    border: 1px solid rgb(104, 101, 101);
    color: white;
}

.tbox {
    background-color: white;
    color: black;

}
hr {
    position: relative;
    top:5%;
}
.primecheckform {
    display: block;
    top: 200px;
    right: 0px;
    position: absolute;
    text-align: right;
    border: 1px solid black;
    padding: 2%;
}
#primeformat {
    display: inline-block;
}
.additionallinks {
    display: inline-block;
    margin-left: 5%;
}
#introtext {
    text-align: justify;
    text-justify: inter-word;
    width: 700px;
}
.pl {
    display: block;
    text-align: left;
    width: 600px;
    height: auto;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
}
#learnheader {
    display: inline-block;
    margin-top: 20px;
    align-content: center;
    position: relative;
}
.screenshot {
    display: inline-block;
    width: 200px;
    height: auto;
    border: 1px solid black;
}
#wide {
    width: 300px;
}
.caption {
    font-size: 12px;
}
.pl2container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}
.p2row {
    display: flex;
    flex-direction: column;
    gap:20px;
    flex-wrap: wrap;
}
.p2buttons {
    display: flex;
    flex-direction: row;
    gap:30px;
    align-self: flex-start;
    margin: 3%;
    margin-left: 10%;
}
.pl3container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}
.pl3left {
    display: flex;
    flex-direction: column;
    border-right: 1px solid black;
}
.hint {
    margin-top: 5%;
}

#hintandcipher {
    display: flex;
    gap: 30px;

}
#hintandlink {
    display: flex;
    flex-direction: column;
    margin-top: 5%;
    margin-left: 5%;
}
#plright {
    width: 400px;
}
#plb {
    width: 800px;
    margin-bottom: 25px;
}
#plc {
    width: 1000px;
    margin-bottom: 25px;
}
#pld {
    width: 600px;
}

@keyframes factfadeinout {
    0%{opacity: 1;}
    100%{opacity: 0;}
}

#mathfact {
    position: absolute;
    display: block;
    width:220px;
    height:auto;
    font-style: italic;
    text-align: center;
    top: 0;
    right: 10%;
    font-size: 14px;
    transform: rotate(5deg);
}
#mathfact:hover {
    animation: factfadeinout 3s infinite alternate;
}

.divider {
    margin-top: 8%;
}

#firstlink {
    margin-left: 10%;
}

#pabout {
    text-align: justify;
    padding-left:5%;
    padding-right:5%;
}

#quote {
    text-align: center;
    font-style: italic;
    margin-bottom: 25%;
}

.out {
    width: 200px;
    height: 100px;
}
